<template>
	<view>
		<!-- 搜索 -->
		<view>
			<lv-select
			@handleSearch = "handleSearch"
			@change = "change"
			placeholder = "请输入信息"
			:infoList = "infoList"
			:showValue = "showValue"
			v-model = "searchValue"
			:loading = "loading"
			type = "primary"
			:uniShadow = "true"
			></lv-select>
		</view>
		<task-List></task-List>
	</view>
	
</template>

<script>
	import taskList from '../../components/taskList/taskList'
	import lvSelect from '../../components/lv-select/lv-select'
	
	export default {
		components:{"task-List":taskList,lvSelect},
		data() {
			return {
				loading: false,
				showValue: 'name', // 需要显示的数据，必须与infoList中的name对应
				searchValue: '',
				infoList: [],
				infoLists: []
			};
		},
		//下拉
		onPullDownRefresh() {
			console.log("下拉触发")
		},
		
		//触底触发
		onReachBottom(){
			
		},
		methods:{				
			handleSearch() {
				this.loading = true
				setTimeout(() => {
					this.loading = false
					this.infoList = this.infoLists
				}, 2000)
			},
			change(val){
				console.log(val)
			}
		}
	}
</script>

<style lang="scss">
	page{
		background-color: #eee;
	}
</style>
